<div class="title">Kết quả hành chính</div>
<div id="formXuly">
	<?php echo $this->Form->create('Hoso', array('inputDefaults' => array('error' => false),'id'=>'XuLy')); ?>
	<div id="generalInfo">
		<p>
			<span class="title">TTHC</span>
			<span><input disabled="true" value="<?php echo $hoso['Tthc']['ten']?>" style="width: 250px;"/></span>
			<span class="title2">Mã hồ sơ</span>
			<span><input disabled="true" value="<?php echo $hoso['Hoso']['code'];?>" style="width: 100px;"/></span>
			<span class="title3">Email</span>
			<span><input disabled="true" value="<?php echo $hoso['Hoso']['email'];?>" style="width: 320px;"/></span>
		</p>
		<p>
			<span class="title">Họ tên</span>
			<span><input disabled="true" value="<?php echo $hoso['Hoso']['ten'];?>" style="width: 250px;"/></span>
			<span class="title2">Địa chỉ</span>
			<span><input disabled="true" value="<?php echo $hoso['Hoso']['dia_chi'];?>" style="width: 523px;"/></span>
		</p>
		<p>
			<span class="title">Về việc</span>
			<span><input value="<?php echo $hoso['Hoso']['noidungxuly'];?>" style="width: 865px;"/></span>
		</p>
		<p>
			<span class="title">Ngày hẹn trả</span>
			<span><input disabled="true" value="<?php echo $this->Time->format('d/m/Y', $hoso['Hoso']['ngay_hen_tra']);?>" style="width: 128px;"/></span>
			<?php if(isset($qua_han)): ?>
			<span class="title3" style="background-color: red;font-weight: bold; padding:5px; width: 80px; margin-left: 107px;">Hồ sơ quá hẹn</span>
			<span><input disabled="true" value="<?php echo $qua_han;?>"/></span>
			<?php endif; ?>
		</p>
		<table width="100%" cellspacing="0">
			<tr>
				<td>STT</td>
				<td>Số/Ký hiệu</td>
				<td>Ngày</td>
				<td>Về việc</td>
				<td>Người ký</td>
				<td>Báo cáo TK</td>
				<td>Phân loại</td>
				<td>Action</td>
			</tr>
			<?php foreach ($ketquas as $key => $ketqua):?>
			<tr>
				<td><?php echo $key + 1;?></td>
				<td align="center"><?php echo $ketqua['Ketquahanhchinh']['so_van_ban'];?></td>
				<td><?php echo $ketqua['Ketquahanhchinh']['ngay_ban_hanh'];?></td>
				<td><?php echo "";?></td>
				<td align="center"><?php echo $ketqua['Ketquahanhchinh']['nguoi_ky'];?></td>
				<td align="center"><?php echo $this->Html->link('Báo cáo TK', array('action' => 'baocaoTk', $ketqua['Ketquahanhchinh']['id'],$selectedHoso));?></td>
				<td align="center"><?php echo $this->Html->link('Phân loại', array('action' => 'baocaoPl', $ketqua['Ketquahanhchinh']['id'],$selectedHoso));?></td>
				<td align="center">
					<?php echo $this->Html->link('Sửa', array('action' => 'updateKqhc', $ketqua['Ketquahanhchinh']['id'],$selectedHoso));?>
					<?php echo $this->Html->link('Xóa', array('action' => 'deleteKqhc', $ketqua['Ketquahanhchinh']['id'],$selectedHoso),null, __('Bạn có chắc là muốn xóa kết quả hành chính %s?', $ketqua['Ketquahanhchinh']['so_van_ban']));?>
				</td>
			</tr>
			<?php endforeach; ?>
			<?php if (empty($ketquas)):?>
			<tr>
				<td colspan="10" align="center">Hiện chưa có kết quả hành chính nào cho hồ sơ này</td>
			</tr>
			<?php endif; ?>
		</table>
	</div>
	<hr style="color: #1F7BC3;" />
	<div id="buttons" style="text-align: center;">
		<?php echo $this->Html->link('Thêm',array('action' => 'vaoso', $selectedHoso), array('id' => 'add', 'class' => 'button blue'));?>
		<?php echo $this->Html->link('Thoát',array('action' => 'xuly', $selectedHoso), array('id' => 'back', 'class' => 'button blue'));?>
		<div class="clear"></div>
	</div>
    <input type="hidden" name="data[Hoso][id]" value="<?php echo $hoso['Hoso']['id'];?>"/> 
	<?php echo $this->Form->end();?>
</div>